<template>
  <view class="con">
    <template v-if="myList.length > 0">
      <PeopleItem v-for="(item, index) in myList" :key="index" :info="item" />
    </template>
    <view v-else style="width: 100%; display: flex; justify-content: center; margin-top: 15rpx">
      <u-empty mode="list"></u-empty>
    </view>
  </view>
</template>

<script setup lang="ts">
import PeopleItem from "@/components/peopleItem.vue";
import { onMounted, ref } from "vue";
import { userFriendsSquare } from "@/api/home";
const myList = ref<myTypes.myFriendsList[]>([]);
onMounted(async () => {
  const res = await userFriendsSquare();
  myList.value = res.data;
});
</script>

<style lang="less" scoped>
.con {
  background: #fff;
  padding: 34rpx 48rpx;
  margin-top: 20rpx;
}
</style>
